{% extends 'index.html' %}
{% block grid %}
    <div class="ui equal width grid" style="width:80%;margin:5px 5px 5px 5px;">
        <div class="row">
            <div class="column">
                <div class="ui red segment">
                    <div class="ui statistic">
                        <div class="value">
                            {{ counts }}
                        </div>
                        <div class="label">
                            Counts
                        </div>
                    </div>
                </div>
            </div>
            <div class="column">
                <div class="ui blue segment">
                    <div class="ui statistic">
                        <div class="value">
                            {{ last_time.release_time }}
                        </div>
                        <div class="label">
                            last_time
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="column">
                <div class="ui segment">
                    <div class="ui container">
                        <div class="ui left divided items">
                            {% for job in Job %}
                                <div class="item">
                                    <div class="content">
                                        <a class="ui blue header" href="{{ job.url }}"
                                           target="_blank">{{ job.positionname }}&nbsp&nbsp&nbsp&nbsp</a>

                                        <div class="header">
                                            <p>{{ job.company }}&nbsp&nbsp&nbsp&nbsp</p>
                                        </div>
                                        <div class="header">
                                            <p>{{ job.location }}&nbsp&nbsp&nbsp&nbsp</p>
                                        </div>
                                        <div class="header">
                                            <p>{{ job.salary }}&nbsp&nbsp&nbsp&nbsp</p>
                                        </div>
                                        <div class="right floated header">
                                            <p>{{ job.release_time }}</p>
                                        </div>

                                        <div class="extra">
                                            <div class="ui label">
                                                学历要求：{{ job.edu_background }}
                                            </div>
                                            <div class="ui label">
                                                工作经验：{{ job.work_exp }}
                                            </div>
                                            <div class="ui label">
                                                公司性质：{{ job.company_nature }}
                                            </div>
                                            <div class="ui label">
                                                公司规模：{{ job.company_scale }}
                                            </div>

                                        </div>
                                    </div>
                                </div>
                            {% endfor %}
                        </div>
                        <div class="ui small pagination menu">
                            {% if Job.has_previous %}
                                <a class="icon item" href="?page={{ Job.previous_page_number }}&search_word={{ search_word }}">
                                    <i class="left arrow icon"></i>
                                </a>
                            {% endif %}
                            <div class="disabled item">
                                {{ Job.number }} of {{ Job.paginator.num_pages }}
                            </div>
                            {% if Job.has_next %}
                                <a class="icon item" href="?page={{ Job.next_page_number }}&search_word={{ search_word }}">
                                    <i class="right arrow icon"></i>
                                </a>
                            {% endif %}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
{% endblock %}
